package com.wj.facedetect.net;

import android.util.Log;

import com.zhy.http.okhttp.callback.Callback;

import okhttp3.Response;

public abstract class BaseCallBack<T extends BaseResponse> extends Callback<T> {
    private final String TAG = "BaseCallBack";
    private T t;

    @Override
    public T parseNetworkResponse(Response response, int id) throws Exception {
        if (t != null) {
            String msg = response.body().string();
            Log.i(TAG, "------response.body------>" + msg);
            t.parseIt(msg);
            return t;
        }
        return null;
    }


    public BaseCallBack(T t) {
        this.t = t;
    }
}
